package com.jack.helloworld.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.jack.helloworld.R;

import androidx.appcompat.app.AppCompatActivity;

public class FragmentTestActivity extends AppCompatActivity {

    TextView tvStaticFragment;
    Button btnStaticFragment;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_fragment_test);

        initView();
        initData();
    }

    private void initView() {
        tvStaticFragment = (TextView) findViewById(R.id.tvStaticFragment);
        btnStaticFragment = (Button) findViewById(R.id.btnStaticFragment);
    }

    private void initData() {
        btnStaticFragment.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                tvStaticFragment.setText(R.string.click_change_fragment);
            }
        });
    }
}
